<?php
require_once ('CLASS/Image.php');
/**************************************************************************
* Source File	:  Album.php
* Author                   :  Marian
* Project name         :  Accueil Win'Design version 14* Created                 :  20/01/2015
* Modified   	:  20/01/2015
* Description	:  Definition of the class Album
**************************************************************************/




class Album 			
{
	//Attributes
		
	 
	Private $titre; 
	Private $description; 
	Private $emplacement;
	Private $DesImages=array();

	// Setters
	public function __set($propriete, $valeur) {
	
		switch ($propriete) {
			case 'titre' : {
				$this->titre = $valeur;
				break;
			}
	
			case 'description' : {
				$this->description = $valeur;
				break;
			}
			
			case 'emplacement' : {
				$this->emplacement = $valeur;
				break;
			}
	
			case 'DesImages' : {
				$this->DesImages[count($this->DesImages)+1] = $valeur;
				break;
			}
		}
	}
	
	//Operations
	//Constructeur 
	public function __construct($vtitre, $vdescription, $vemplacement)
	{
		$this->titre = $vtitre;
		$this->description = $vdescription;
		$this->emplacement = $vemplacement;
	}
	
		// La variable RetVal est de type int
		
	
	public function PDO ()
	{
		require_once (dirname(getcwd()).'/MyPDO.php');
		require_once 'PreparationREQAlbum.php';
		$PrepREQ = new PreparationREQAlbum(new MyPDO());
		return $PrepREQ;
	}
			
	 
	

} // End Class Album


?>

